namespace Digitalmes.Common.Workflows;

/// <summary>
/// 事件函数。
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class WorkflowFunctionAttribute : Attribute
{
    /// <summary>
    /// 获取函数名称。
    /// </summary>
    /// <remarks>如果为 null，设置此特性的方法将被使用。</remarks>
    public string? Name { get; }

    public WorkflowFunctionAttribute() { }

    public WorkflowFunctionAttribute(string? name) => Name = name;
}
